-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create gyro E-CLP on v3 #570
base: main
Are you sure you want to change the base?
Conversation
// TODO: grow bigger brain to figure out param values that trigger InvariantDenominatorWrong | ||
test.skip('InvariantDenominatorWrong()', async () => { | ||
expect( | ||
buildCallWithModifiedInput({ | ||
eclpParams: { | ||
s: _ONE, | ||
}, | ||
derivedEclpParams: { | ||
u: _ONE_XP, | ||
}, | ||
}), | ||
).toThrowError( | ||
`InvariantDenominatorWrong: mulDenominator must be <= ${_MAX_INV_INVARIANT_DENOMINATOR_XP}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone thinks this is worth figuring out, I can spend more time on it, but kinda tricky with the derived params being calculated off chain by closed source code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also is it weird to have the validation tests in SDK repo but the logic in balancer maths?
validateCreatePool(input: CreatePoolGyroECLPInput) { | ||
super.validateCreatePool(input); | ||
|
||
const { eclpParams, derivedEclpParams } = input; | ||
|
||
GyroECLPMath.validateParams(eclpParams); | ||
GyroECLPMath.validateDerivedParams(eclpParams, derivedEclpParams); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was such a satisfying refactor 😍
Closes #571
Summary
TokenConfig[]
type for thetokens
propertybalancer-maths
as dependency for gyro ELCP input validations